package Day2025_03_10;

import java.util.Arrays;
import java.util.Scanner;


// N, M, K
/**
 * N : 几行数据
 * M : 面额
 * K : 最大天数
 */

public class HomeWork01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(), M = sc.nextInt(), K = sc.nextInt();
        int[][] ret = new int[N][3];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < 3; j++) {
                ret[i][j] = sc.nextInt();
            }
            sc.nextLine();
        }
        int[] cur = new int[366];
        for (int i = 0; i < N; i++) {
            int k = ret[i][0];
            int tmp = (k - 1) * 30 + k / 2 +  ret[i][1];
            if (k >= 3) tmp -= 2;
//            System.out.println(tmp);
            cur[tmp] = ret[i][2];
        }
        int[] index = new int[366];


    }

    public static void quickSort(int[] array) {
        quick(array,0,array.length - 1);
    }

    private static void quick(int[] array, int left, int right) {
        if(left > right) return;
        int par = partition(array,left,right);
        quick(array,left,par-1);
        quick(array,par+1,right);
    }

    private static int partition(int[] array,int start,int end) {
        int pivot = array[start];
        while(start < end) {
            while(start < end && array[end] >= pivot) {
                end--;
            }
            array[start] = array[end];
            while(start < end && array[start] <= pivot) {
                start++;
            }
            array[end] = array[start];
        }
        array[start] = pivot;
        return start;
    }
}
